<template>
    <div id="main" class="app-main">
        <AliveRouterView></AliveRouterView>
    </div>
</template>

<script>
import Cookies from 'js-cookie';
import Member from "@/common/model/Member";

export default {
    mounted () {

    },
    beforeDestroy () {

    },
    methods: {

    },
    created() {
        this.api.post("datadictionary/dictionary_tree", null, res => {
            this.process(()=> {
                this.$store.commit('setDicTree', res.data); // 设置字典树
            }, "dic_tree");
        });
        this.api.post("free_value/get_website", null, res => {
            this.$store.commit('setWebsite', res.data || {}); // 设置网站基本信息
            //if(res.data.is_maintain.value == "1") this.$router.push({ name: 'maintain' });
        });
        if(Cookies.get('access') == "member") {
            this.api.post("me/get_info", null, res => {
                this.$store.commit('setUserInfo', Member.parse(res.data)); // 保存用户信息
            });
        }
    }
};

</script>

<style>
.app-main{
    width: 100%;
    height: 100%;
}
ul {list-style:none;}
</style>
